package cn.samehope.pet.engine;

import java.io.File;

import com.jfinal.kit.StrKit;

/**
 * 模板图片参数
 * @author LD
 *
 */
public class PicEngine {
	
	/**
	 * 根据参数判断，显示猫狗图片
	 * @param str
	 * @param category
	 * @return
	 */
	public static String getPic(String str, String category){
		String path = str;
		if(StrKit.isBlank(str)){
			if(category.equals("0")){
				path = "_view" + File.separator + "static" + File.separator + "images" + File.separator + "dog.jpg";
			}else{
				path = "_view" + File.separator + "static" + File.separator + "images" + File.separator + "cat.jpg";
			}
		}
		
		return path;
	}

}
